package cn.sh.yhk;

public class ClassLoad {

    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        ClassLoader load = ClassLoadTest1.class.getClassLoader();
        load.loadClass("cn.sh.yhk.ClassLoadTest2");
        System.out.println(load);

        ClassLoadTest2 aClass = (ClassLoadTest2)Class.forName("cn.sh.yhk.ClassLoadTest2").newInstance();

        System.out.println(aClass);
    }
}
